using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Cou;
using net_work.Data.Entity.Cou;

namespace net_work.IService.Cou;

public interface IEnrollmentService
{
    /// <summary>
    /// 分页查询选课
    /// </summary>
    /// <param name="request">查询参数</param>
    /// <returns>分页结果</returns>
    Task<PagedResult<Enrollment>> GetEnrollmentsPagedAsync(PagedRequest request);

    /// <summary>
    /// 根据选课ID查询选课信息
    /// </summary>
    /// <param name="enrollmentId">选课ID</param>
    /// <returns>选课信息</returns>
    Task<Enrollment?> SelectByIdAsync(long enrollmentId);

    /// <summary>
    /// 插入选课
    /// </summary>
    /// <param name="enrollmentAddRequest">新增选课实体</param>
    /// <returns>选课ID</returns>
    Task<long> InsertEnrollment(EnrollmentAddRequest enrollmentAddRequest);

    /// <summary>
    /// 更新选课信息
    /// </summary>
    /// <param name="enrollmentUpdateRequest">更新选课信息</param>
    /// <returns>是否成功</returns>
    Task<int> UpdateEnrollment(EnrollmentUpdateRequest enrollmentUpdateRequest);

    /// <summary>
    /// 删除选课
    /// </summary>
    /// <param name="ids">选课ID集合</param>
    /// <returns>是否成功</returns>
    Task<int> DeleteEnrollmentByIds(List<long> ids);
}